package com.common.springbootcommonmessage.mapper;

import com.common.springbootcommonmessage.model.CommonAutopartNotification;
import com.common.springbootcommonmessage.model.CommonAutopartNotificationitem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommonAutopartNotificationMapper {
    int deleteByPrimaryKey(Integer ID);

    int insert(CommonAutopartNotification record);

    int insertSelective(CommonAutopartNotification record);

    CommonAutopartNotification selectByPrimaryKey(Integer ID);

    int updateByPrimaryKeySelective(CommonAutopartNotification record);

    int updateByPrimaryKey(CommonAutopartNotification record);

    List<CommonAutopartNotification> findByOrderIDAndRmaIDAndIsNew(@Param("orderId") Integer orderId, @Param("rmaId")Integer rmaId, @Param("isNew")Boolean isNew);

    Integer updateTemplateIDByID(@Param("Id") Integer id, @Param("notificationTemplateID") Integer notificationTemplateID);

    Integer updateAllReadByID(@Param("id") Integer id, @Param("allRead") Boolean allRead);

    List<CommonAutopartNotification> findNotAllReadByOrderIDAndRmaID(@Param("orderId") Integer orderId, @Param("rmaId") Integer rmaId);
}